global_var = 42

local_var = 10




code= """


result = global_var + local_var

"""


namespace = {"global_var": global_var, "local_var": local_var}

exec(code, namespace)



result = namespace["result"]

print(result)  # 输出 52

